builder.component{
    current.clients.add(protocol.HTTP)
    current.clients.add(protocol.FILE)
    current.clients.add(protocol.CLAP)
    application(uri:gwtRoot){
        router{
            directory(uri:"/static",ofClass:"any.restlet.GWTDirectory",
            		consArgs:[current.context,"clap://class/static"] as Object[])
            resource(uri:"/", ofBean:"gwtHomeResource")
        }
    }
	application(uri:appRoot){
		router{
			resource(uri:"/search", ofBean:"searchResultResource")
			resource(uri:"/item/{id}", ofBean:"fileItemResource")
		}
	}
	application(uri:tagApp){
	    router{
            resource(uri:"/tags.{type}", ofBean:"tagsResource")
            resource(uri:"/tag/{tag}.{type}", ofBean:"tagResource")
            resource(uri:"/tag", ofBean:"tagResource")
            resource(uri:"/tag/about/{about}.{type}", 
                    ofBean:"tagAboutResource")
        }
	}
}